<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            transform: translate(100px,100px);
            /* position: absolute;
            left: 100px;
            top: 100px; */
            width: 100px;
            height: 100px;
            border: 6px solid black;
        }
        .bar{
            /* 固定定位的父元素存在transform样式描述时，固定定位可能会失去部分特性 */
            position: fixed;
            left: 0px;
            top: 0px;
            width: 100%;
            background-color: brown;
            height: 100px;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="bar"></div>
    </div>
</body>
</html>